<?php
/**
 * created by zzy
 * date: 2017/11/16 11:02
 */
namespace App\Http\Admin\Company\Models;
use App\Eloquent\Ygt\Company as YgtCompany;

class Company extends YgtCompany{

    public static function getJsonList()
    {
        $lists              = self::getList('','id,title','','',['id','asc'])->toArray();
        $result             = [];
        foreach( $lists as $key=>$val ){
            $arr            = [ $val['id']=>$val['title'] ];
            $result[]       = $arr;
        }
        $json               = json_encode( $result );
        return $json;
    }


}